<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page functions.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name"><img src="../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/library/functions.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Fabulous functions file</p>
	<ul class="tags">
				<li><span class="field">author:</span> Prashant Pandey &lt;<a href="mailto:Prashant.Pandey@unisa.edu.au">Prashant.Pandey@unisa.edu.au</a>&gt;</li>
				<li><span class="field">access:</span> public</li>
			</ul>
		
			</div>
</div>
		

	
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functionauthenticate" id="functionauthenticate"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">authenticate</span> (line <span class="line-number">570</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get tagName from XML node.</p>
	<ul class="tags">
				<li><span class="field">return:</span> true/false user authentication flags</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			authenticate
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$user</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$pass</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$port</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$ver</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$index</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$user</span><span class="var-description">: submitted fedora username</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$pass</span><span class="var-description">: submitted fedora password</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$host</span><span class="var-description">: submitted fedora host</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$port</span><span class="var-description">: submitted fedora port</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$ver</span><span class="var-description">: submitted fedora version</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$index</span>			</li>
				</ul>
		
	
</div>
<a name="functionbottom_tags" id="functionbottom_tags"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">bottom_tags</span> (line <span class="line-number">388</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">prints the Footer of the page</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">HTML</span>
		<span class="method-name">
			bottom_tags
		</span>
				()
			</div>

		
	
</div>
<a name="functiondeleteNode" id="functiondeleteNode"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">deleteNode</span> (line <span class="line-number">824</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">deletes the marcxml node from the marcxml datastream</p>
	<ul class="tags">
				<li><span class="field">return:</span> MARCXML</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">modified</span>
		<span class="method-name">
			deleteNode
		</span>
					(<span class="var-type">$xml_output</span>&nbsp;<span class="var-name">$xml_output</span>, <span class="var-type">$deleteDataField</span>&nbsp;<span class="var-name">$deleteDataField</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">$xml_output</span>
				<span class="var-name">$xml_output</span><span class="var-description">: Marcxml datastream</span>			</li>
					<li>
				<span class="var-type">$deleteDataField</span>
				<span class="var-name">$deleteDataField</span><span class="var-description">: Marcxml datafield to be deleted</span>			</li>
				</ul>
		
	
</div>
<a name="functiondumpNode" id="functiondumpNode"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">dumpNode</span> (line <span class="line-number">488</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Extract raw XML from node.</p>
	<ul class="tags">
				<li><span class="field">return:</span> raw xml</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">$return</span>
		<span class="method-name">
			dumpNode
		</span>
					(<span class="var-type">$node</span>&nbsp;<span class="var-name">$node</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">$node</span>
				<span class="var-name">$node</span><span class="var-description">: node</span>			</li>
				</ul>
		
	
</div>
<a name="functionencodeBin" id="functionencodeBin"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">encodeBin</span> (line <span class="line-number">591</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">encodeBin - Takes $data and returns a byte array</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			encodeBin
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$data</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$data</span><span class="var-description">: Data to be translated</span>			</li>
				</ul>
		
	
</div>
<a name="functionfunction_implementation" id="functionfunction_implementation"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">function_implementation</span> (line <span class="line-number">174</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">provides the selection of various functionalities like search&amp;Replace, addition and Deletion within the Edit form</p>
	<ul class="tags">
				<li><span class="field">return:</span> form</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">HTML</span>
		<span class="method-name">
			function_implementation
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$fields</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$fields</span>			</li>
				</ul>
		
	
</div>
<a name="functionget" id="functionget"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">get</span> (line <span class="line-number">693</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">gets global value</p>
	<ul class="tags">
				<li><span class="field">return:</span> value</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">global</span>
		<span class="method-name">
			get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: glabal array index</span>			</li>
				</ul>
		
	
</div>
<a name="functiongetTagName" id="functiongetTagName"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getTagName</span> (line <span class="line-number">546</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get tagName from XML node.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">Tagname</span>
		<span class="method-name">
			getTagName
		</span>
					(<span class="var-type">$node</span>&nbsp;<span class="var-name">$node</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">$node</span>
				<span class="var-name">$node</span><span class="var-description">: xml node</span>			</li>
				</ul>
		
	
</div>
<a name="functionget_datastream" id="functionget_datastream"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">get_datastream</span> (line <span class="line-number">807</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">gets the datastream using REST</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">datastream</span>
		<span class="method-name">
			get_datastream
		</span>
					(<span class="var-type">$pid</span>&nbsp;<span class="var-name">$pid</span>, <span class="var-type">$datastream</span>&nbsp;<span class="var-name">$datastream</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">$pid</span>
				<span class="var-name">$pid</span><span class="var-description">: the fedora pid along with namespace</span>			</li>
					<li>
				<span class="var-type">$datastream</span>
				<span class="var-name">$datastream</span><span class="var-description">: datstream ID</span>			</li>
				</ul>
		
	
</div>
<a name="functionget_datastream_from_url" id="functionget_datastream_from_url"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">get_datastream_from_url</span> (line <span class="line-number">758</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">gets the datastream from the URI</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">datastream</span>
		<span class="method-name">
			get_datastream_from_url
		</span>
					(<span class="var-type">$url</span>&nbsp;<span class="var-name">$url</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">$url</span>
				<span class="var-name">$url</span><span class="var-description">: the fedora get urI</span>			</li>
				</ul>
		
	
</div>
<a name="functionload_config" id="functionload_config"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">load_config</span> (line <span class="line-number">707</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">loads variables from the config file as global values</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			load_config
		</span>
					(<span class="var-type">$file</span>&nbsp;<span class="var-name">$file</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">$file</span>
				<span class="var-name">$file</span><span class="var-description">: config file</span>			</li>
				</ul>
		
	
</div>
<a name="functionloginForm" id="functionloginForm"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">loginForm</span> (line <span class="line-number">606</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">prints the login form</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">HTML</span>
		<span class="method-name">
			loginForm
		</span>
				()
			</div>

		
	
</div>
<a name="functionobject2array" id="functionobject2array"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">object2array</span> (line <span class="line-number">851</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">converts an object into array</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			object2array
		</span>
					(<span class="var-type">$object</span>&nbsp;<span class="var-name">$object</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">$object</span>
				<span class="var-name">$object</span>			</li>
				</ul>
		
	
</div>
<a name="functionretrieveHandle" id="functionretrieveHandle"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">retrieveHandle</span> (line <span class="line-number">508</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">retrives handle from the DC datastream</p>
	<ul class="tags">
				<li><span class="field">return:</span> Handle, persisitent identifier</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">$handle</span>
		<span class="method-name">
			retrieveHandle
		</span>
					(<span class="var-type">$xmlstring</span>&nbsp;<span class="var-name">$xmlstring</span>, <span class="var-type">$namespace</span>&nbsp;<span class="var-name">$namespace</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">$xmlstring</span>
				<span class="var-name">$xmlstring</span><span class="var-description">: dc xml datastream as string</span>			</li>
					<li>
				<span class="var-type">$namespace</span>
				<span class="var-name">$namespace</span><span class="var-description">: Handle namespace, read from the config file</span>			</li>
				</ul>
		
	
</div>
<a name="functionsearch_formA" id="functionsearch_formA"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">search_formA</span> (line <span class="line-number">45</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">prints the search form for Activation of dataStream</p>
	<ul class="tags">
				<li><span class="field">return:</span> form</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">HTML</span>
		<span class="method-name">
			search_formA
		</span>
				()
			</div>

		
	
</div>
<a name="functionsearch_formD" id="functionsearch_formD"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">search_formD</span> (line <span class="line-number">75</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">prints the search form for De-Activation of dataStream</p>
	<ul class="tags">
				<li><span class="field">return:</span> form</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">HTML</span>
		<span class="method-name">
			search_formD
		</span>
				()
			</div>

		
	
</div>
<a name="functionsearch_formE" id="functionsearch_formE"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">search_formE</span> (line <span class="line-number">121</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">prints the EDIT form for Batch Metadata Editing</p>
	<ul class="tags">
				<li><span class="field">return:</span> form</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">HTML</span>
		<span class="method-name">
			search_formE
		</span>
				()
			</div>

		
	
</div>
<a name="functiontest" id="functiontest"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">test</span> (line <span class="line-number">104</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Redundant functionality for testing HTML</p>
	<ul class="tags">
				<li><span class="field">return:</span> form</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">HTML</span>
		<span class="method-name">
			test
		</span>
				()
			</div>

		
	
</div>
<a name="functiontop_navigation" id="functiontop_navigation"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">top_navigation</span> (line <span class="line-number">150</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">prints the Navigation bar</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">HTML</span>
		<span class="method-name">
			top_navigation
		</span>
				()
			</div>

		
	
</div>
<a name="functionUPLOADER" id="functionUPLOADER"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">UPLOADER</span> (line <span class="line-number">416</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Content file uploading functionality - Batch upload</p>
	<ul class="tags">
				<li><span class="field">return:</span> files to be uploaded with their paths</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			UPLOADER
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$num_of_uploads</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$file_types_array</span> = <span class="var-default">array(&amp;quot;xml&amp;quot;,&amp;quot;doc&amp;quot;,&amp;quot;pdf&amp;quot;, &amp;quot;gif&amp;quot;, &amp;quot;jpg&amp;quot;)</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$max_file_size</span> = <span class="var-default">100048576</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$upload_dir</span> = <span class="var-default">&amp;quot;./library/uploads/&amp;quot;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$num_of_uploads</span><span class="var-description">: numbers of files allowed to be uploaded per transaction, value read from config file</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$file_types_array</span><span class="var-description">: files extensions allowed to be uploaded</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$max_file_size</span><span class="var-description">: upload file size allowed as a check condition for the upload</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$upload_dir</span><span class="var-description">: path of the temp upload directory on the webserver</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Tue, 07 Aug 2007 07:59:48 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>